<%@ page language="java" import="java.util.*,java.sql.*"
	pageEncoding="utf-8"%>
<%@page import="DAO.UserDao"%>
<%@page import="VO.User"%>
<html>
<head>
<title>用户信息查看</title>
<link rel="stylesheet" type="text/css" href="css/public.css">
<link rel="stylesheet" type="text/css" href="css/user_msg_check.css">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
  <link rel="stylesheet" type="text/css" href="styles.css">
  -->

</head>
<body>
	<div id="mainbody">
		<div id="title">用户信息</div>
		<% ArrayList users = null;
    UserDao userdao = new UserDao();
    users = userdao.queryAllUser();//调用queryAllUser()方法%>
		<table border=2>
			<tr class="title">
				<td>账号</td>
				<td>姓名</td>
				<td>电话</td>
				<td>密码</td>
				<td>邮箱</td>
			</tr>
			<% for (int i = 0; i < users.size(); i++) {
        User user = (User) users.get(i); %>
			<tr>
				<td><%=user.getAccount()%></td>
				<td><%=user.getName()%></td>
				<td><%=user.getTele()%></td>
				<td><%=user.getPassword()%></td>
				<td><%=user.getMail()%></td>
			</tr>
			<% } %>
			<div id="total">
				<%int n=userdao.userTotal(); %> 
				<%--调用userTotal()方法 --%>
				用户总数:&nbsp;&nbsp;<%=n%>
			</div>
			<br>
		</table>
	</div>
</body>
</html>